package com.uton.rfidcontroller.view.fragment;

import com.uton.rfidcontroller.R;
import com.uton.rfidcontroller.customize.Tablayout;
import com.uton.rfidcontroller.databinding.FragmentMainLeftBinding;
import com.uton.rfidcontroller.view.adapter.BankingContentAdapter;
import com.uton.rfidcontroller.view.base.BaseFragment;
import com.uton.rfidcontroller.viewmodel.fragment_model.MainLeftViewModel;

import butterknife.BindView;
import io.reactivex.ObservableTransformer;

/**
 * Created by 王家宝 on 2017/9/5.
 * Email:639586819@qq.com
 * Tel:18241150668
 */

public class MainLeftFragment extends BaseFragment<FragmentMainLeftBinding, MainLeftViewModel> {
    @BindView(R.id.tablayout)
    Tablayout mTablayout;

    @Override
    public void doSomeThing() {
        mTablayout.initViewPager(new BankingContentAdapter(getChildFragmentManager()),
                new HasDoTaskFragment(), new AlreadyDoTaskFragment());
        mTablayout.setLeftTitle(R.string.ui_has_do_task);
        mTablayout.setRightTitle(R.string.ui_already_do_task);
    }

    @Override
    public int setLayout() {
        return R.layout.fragment_main_left;
    }

    @Override
    public void inject() {
        getBinding().setMainLeftViewModel(getViewModel());
    }

    @Override
    protected MainLeftViewModel setViewModel() {
        return new MainLeftViewModel() {
            @Override
            public ObservableTransformer setObservable() {
                return null;
            }
        };
    }
}
